{{template "public/header.html" .}}
<script language="javascript" src="/public/js/Setting/menu.js"></script>

<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a href='/Menu/'><em>菜单管理</em></a><span>|</span> <a
				href='javascript:;' class="on"><em>添加菜单</em></a>
		</div>
	</div>
	<form name="myform" id="myform" action="{{url "Menu.Add"}}"
		onsubmit="return form_submit()" method="post">
		<div class="common-form">
			<table width="100%" class="table_form contentWrap">
				<tr>
					<th width="200"><strong>上级菜单：</strong></th>
					<td><select id="pid" name="pid" style="width: 200px;">
						<option value="0">顶部菜单</option> 
						{{if .menus}}
							{{.menus}}
						{{end}}
					</select></td>
				</tr>

				{{with $field := field "menu.Name" .}}
				<tr>
					<th><strong>菜单名称：</strong></th>
					<td>
						<input type="text" name="name" id="name" class="input-text" value="">
						{{if $field.Error}}
							<div id="realnameTip" class="onShow">{{$field.Error}}</div>
						{{end}}
					</td>
				</tr>
				{{end}}

				{{with $field := field "menu.Url" .}}
				<tr>
					<th><strong>功能地址：</strong></th>
					<td>
						<input type="text" name="url" id="url" class="input-text" value="" >
						{{if $field.Error}}
							<div id="realnameTip" class="onShow">{{$field.Error}}</div>
						{{end}}
					</td>
				</tr>
				{{end}}

				{{with $field := field "menu.Order" .}}
				<tr>
					<th><strong>排序：</strong></th>
					<td>
						<input type="text" name="order" id="order" class="input-text">
						{{if $field.Error}}
							<div id="realnameTip" class="onShow">{{$field.Error}}</div>
						{{end}}
					</td>
				</tr>
				{{end}}

				{{with $field := field "menu.Data" .}}
				<tr>
					<th><strong>附加参数：</strong></th>
					<td>
						<input type="text" name="data" id="data" class="input-text">
						{{if $field.Error}}
							<div id="realnameTip" class="onShow">{{$field.Error}}</div>
						{{end}}
					</td>
				</tr>
				{{end}}

				<tr>
					<th><strong>是否显示菜单：</strong></th>
					<td>
						<input type="radio" name="display" value="1" checked>是 
						<input type="radio" name="display" value="0">否
					</td>
				</tr>
			</table>
			<!--table_form_off-->
		</div>
		<div class="bk15"></div>
		<div class="btn">
			<input type="submit" id="dosubmit" class="button" name="dosubmit"
				value="提 交" />
		</div>
	</form>
</body>

{{template "public/footer.html" .}}